// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_c;

import java.io.ByteArrayOutputStream;

public class cls_l
{

    public cls_l()
    {
    }

    private static boolean a(byte byte0)
    {
        boolean flag = true;
        if(byte0 != 61) {
        	if(byte0 < 0 || byte0 >= 128)
                flag = false;
            else
            if(c[byte0] == -1)
                flag = false;
        }

        return flag;

    }

    public static byte[] a(String s)
    {
        byte abyte0[];
        if(s == null || s.length() == 0)
            abyte0 = new byte[0];
        else
            abyte0 = b(s.getBytes());
        return abyte0;
    }

    public static byte[] a(byte abyte0[])
    {
        int j;
        byte abyte1[];
        int i = 0;
        j = abyte0.length % 3;
        int k;
        if(j == 0)
            abyte1 = new byte[(4 * abyte0.length) / 3];
        else
            abyte1 = new byte[4 * (1 + abyte0.length / 3)];
        k = abyte0.length - j;
        for(int i1 = i; i1 < k;)
        {
            int j3 = 0xff & abyte0[i1];
            int k3 = 0xff & abyte0[i1 + 1];
            int l3 = 0xff & abyte0[i1 + 2];
            abyte1[i] = b[0x3f & j3 >>> 2];
            abyte1[i + 1] = b[0x3f & (j3 << 4 | k3 >>> 4)];
            abyte1[i + 2] = b[0x3f & (k3 << 2 | l3 >>> 6)];
            abyte1[i + 3] = b[l3 & 0x3f];
            i1 += 3;
            i += 4;
        }

        switch(j)
        {
       
        case 1:
        	
        	int k2 = 0xff & abyte0[-1 + abyte0.length];
            int l2 = 0x3f & k2 >>> 2;
            int i3 = 0x3f & k2 << 4;
            abyte1[-4 + abyte1.length] = b[l2];
            abyte1[-3 + abyte1.length] = b[i3];
            abyte1[-2 + abyte1.length] = 61;
            abyte1[-1 + abyte1.length] = 61;
        	break;
        case 2:
        	
        	int j1 = 0xff & abyte0[-2 + abyte0.length];
            int k1 = 0xff & abyte0[-1 + abyte0.length];
            int l1 = 0x3f & j1 >>> 2;
            int i2 = 0x3f & (j1 << 4 | k1 >>> 4);
            int j2 = 0x3f & k1 << 2;
            abyte1[-4 + abyte1.length] = b[l1];
            abyte1[-3 + abyte1.length] = b[i2];
            abyte1[-2 + abyte1.length] = b[j2];
            abyte1[-1 + abyte1.length] = 61;
        	break;
        default:
        case 0:
        	
        	break;
        }
        return abyte1;
         
    }

    public static byte[] a(byte abyte0[], int i)
    {
        int k;
        byte abyte1[];
        int j = 0;
        k = i % 3;
        int i1;
        if(k == 0)
            abyte1 = new byte[(i * 4) / 3];
        else
            abyte1 = new byte[4 * (1 + i / 3)];
        i1 = i - k;
        for(int j1 = j; j1 < i1;)
        {
            int k3 = 0xff & abyte0[j1];
            int l3 = 0xff & abyte0[j1 + 1];
            int i4 = 0xff & abyte0[j1 + 2];
            abyte1[j] = b[0x3f & k3 >>> 2];
            abyte1[j + 1] = b[0x3f & (k3 << 4 | l3 >>> 4)];
            abyte1[j + 2] = b[0x3f & (l3 << 2 | i4 >>> 6)];
            abyte1[j + 3] = b[i4 & 0x3f];
            j1 += 3;
            j += 4;
        }

        switch(k)
        {
       
        case 1:
        	int l2 = 0xff & abyte0[i + -1];
            int i3 = 0x3f & l2 >>> 2;
            int j3 = 0x3f & l2 << 4;
            abyte1[-4 + abyte1.length] = b[i3];
            abyte1[-3 + abyte1.length] = b[j3];
            abyte1[-2 + abyte1.length] = 61;
            abyte1[-1 + abyte1.length] = 61;
        	break;
        case 2:
        	int k1 = 0xff & abyte0[i + -2];
            int l1 = 0xff & abyte0[i + -1];
            int i2 = 0x3f & k1 >>> 2;
            int j2 = 0x3f & (k1 << 4 | l1 >>> 4);
            int k2 = 0x3f & l1 << 2;
            abyte1[-4 + abyte1.length] = b[i2];
            abyte1[-3 + abyte1.length] = b[j2];
            abyte1[-2 + abyte1.length] = b[k2];
            abyte1[-1 + abyte1.length] = 61;
        	break;
        default:
        case 0:
        	break;
        }
        
        return abyte1;
        
        
    }

    public static byte[] b(byte abyte0[])
    {
    	byte abyte1[] = new byte[0];
        if(a == null)
            a = new ByteArrayOutputStream();
        a.reset();
        if(abyte0 != null && abyte0.length != 0) {
        	if(abyte0.length % 4 == 0);
            byte abyte2[] = c(abyte0);
            byte byte0 = 0;
            byte byte1 = 0;
            byte byte2 = 0;
            byte byte3 = 0;
            int i = 0;
            do
            {
                if(i >= abyte2.length)
                    break;
                if(i < abyte2.length)
                {
                    int j1 = i + 1;
                    byte3 = abyte2[i];
                    if(!a(byte3))
                    {
                        abyte1 = new byte[0];
                        continue; /* Loop/switch isn't completed */
                    }
                    i = j1;
                }
                if(i < abyte2.length)
                {
                    int i1 = i + 1;
                    byte2 = abyte2[i];
                    if(!a(byte2))
                    {
                        abyte1 = new byte[0];
                        continue; /* Loop/switch isn't completed */
                    }
                    i = i1;
                }
                if(i < abyte2.length)
                {
                    int k = i + 1;
                    byte1 = abyte2[i];
                    if(!a(byte1))
                    {
                        abyte1 = new byte[0];
                        continue; /* Loop/switch isn't completed */
                    }
                    i = k;
                }
                if(i < abyte2.length)
                {
                    int j = i + 1;
                    byte0 = abyte2[i];
                    if(!a(byte0))
                    {
                        abyte1 = new byte[0];
                        continue; /* Loop/switch isn't completed */
                    }
                    i = j;
                }
                if(byte3 == b[64] || byte2 == b[64] || byte1 == b[64] && byte0 != b[64])
                {
                    abyte1 = new byte[0];
                    continue; /* Loop/switch isn't completed */
                }
                if(byte1 == b[64])
                {
                    byte byte11 = c[byte3];
                    byte byte12 = c[byte2];
                    a.write((byte)(byte11 << 2 | byte12 >> 4));
                } else
                if(byte0 == b[64])
                {
                    byte byte8 = c[byte3];
                    byte byte9 = c[byte2];
                    byte byte10 = c[byte1];
                    a.write((byte)(byte8 << 2 | byte9 >> 4));
                    a.write((byte)(byte9 << 4 | byte10 >> 2));
                } else
                {
                    byte byte4 = c[byte3];
                    byte byte5 = c[byte2];
                    byte byte6 = c[byte1];
                    byte byte7 = c[byte0];
                    a.write((byte)(byte4 << 2 | byte5 >> 4));
                    a.write((byte)(byte5 << 4 | byte6 >> 2));
                    a.write((byte)(byte7 | byte6 << 6));
                }
            } while(true);
            abyte1 = a.toByteArray();
        }
        return abyte1;
 
    }

    private static byte[] c(byte abyte0[])
    {
        byte abyte1[] = new byte[abyte0.length];
        int i = 0;
        int j = 0;
        for(; i < abyte0.length; i++)
            if(a(abyte0[i]))
            {
                int k = j + 1;
                abyte1[j] = abyte0[i];
                j = k;
            }

        byte abyte2[] = new byte[j];
        System.arraycopy(abyte1, 0, abyte2, 0, j);
        return abyte2;
    }

    static ByteArrayOutputStream a;
    private static final byte b[];
    private static final byte c[];

    static 
    {
        int i = 65;
        byte abyte0[] = new byte[i];
        abyte0[0] = 65;
        abyte0[1] = 66;
        abyte0[2] = 67;
        abyte0[3] = 68;
        abyte0[4] = 69;
        abyte0[5] = 70;
        abyte0[6] = 71;
        abyte0[7] = 72;
        abyte0[8] = 73;
        abyte0[9] = 74;
        abyte0[10] = 75;
        abyte0[11] = 76;
        abyte0[12] = 77;
        abyte0[13] = 78;
        abyte0[14] = 79;
        abyte0[15] = 80;
        abyte0[16] = 81;
        abyte0[17] = 82;
        abyte0[18] = 83;
        abyte0[19] = 84;
        abyte0[20] = 85;
        abyte0[21] = 86;
        abyte0[22] = 87;
        abyte0[23] = 88;
        abyte0[24] = 89;
        abyte0[25] = 90;
        abyte0[26] = 97;
        abyte0[27] = 98;
        abyte0[28] = 99;
        abyte0[29] = 100;
        abyte0[30] = 101;
        abyte0[31] = 102;
        abyte0[32] = 103;
        abyte0[33] = 104;
        abyte0[34] = 105;
        abyte0[35] = 106;
        abyte0[36] = 107;
        abyte0[37] = 108;
        abyte0[38] = 109;
        abyte0[39] = 110;
        abyte0[40] = 111;
        abyte0[41] = 112;
        abyte0[42] = 113;
        abyte0[43] = 114;
        abyte0[44] = 115;
        abyte0[45] = 116;
        abyte0[46] = 117;
        abyte0[47] = 118;
        abyte0[48] = 119;
        abyte0[49] = 120;
        abyte0[50] = 121;
        abyte0[51] = 122;
        abyte0[52] = 48;
        abyte0[53] = 49;
        abyte0[54] = 50;
        abyte0[55] = 51;
        abyte0[56] = 52;
        abyte0[57] = 53;
        abyte0[58] = 54;
        abyte0[59] = 55;
        abyte0[60] = 56;
        abyte0[61] = 57;
        abyte0[62] = 43;
        abyte0[63] = 47;
        abyte0[64] = 61;
        b = abyte0;
        c = new byte[128];
        for(int j = 0; j < 128; j++)
            c[j] = -1;

        for(; i <= 90; i++)
            c[i] = (byte)(i + -65);

        for(int k = 97; k <= 122; k++)
            c[k] = (byte)(26 + (k + -97));

        for(int i1 = 48; i1 <= 57; i1++)
            c[i1] = (byte)(52 + (i1 + -48));

        c[43] = 62;
        c[47] = 63;
        c[61] = 64;
    }
}
